#include<iostream>
#include<string>
using namespace std;
class A
{
public:
    A(const char* str = "hello")
        :name(str)
    {}
    string name;
};
class B :virtual public A
{
public:
    B()
    {}
    int b;
};
class C :virtual public A
{
public:
    C()
    {}
    int c;
};
class D :public B ,public C
{ 
public:
    D()
    {}

    int d;
};
int main()
{
    D d;
    d.B::name = "hello";
    cout << d.B::name << endl;
    cout << d.C::name << endl;
    return 0;
}